<!DOCTYPE html>
<html>
<head>
    <script type="text/javascript" src="${request.getContextPath()}/js/public-head.js"></script>
</head>
<body>
<div class="layui-row">
    <div class="layui-card">
        <div class="layui-card-body">
            <form id="pagerForm" class="layui-form" method="post"  >
                <div class="layui-form-item">
                    <label class="layui-form-label">分区编码</label>
                    <div class="layui-input-block">
                        <input type="text" name="groupNo" class="layui-input" lay-verify="required" value="${groupInstance?.groupNo}">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">名称</label>
                    <div class="layui-input-block">
                        <input type="text" name="groupName" class="layui-input" lay-verify="required"  value="${groupInstance?.groupName}">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label"></label>
                    <div class="layui-input-block">
                        <button  class="layui-btn" lay-submit="*"  lay-filter="*">保存</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>

</body>


<script type="text/javascript">
    layui.config({
        base: basePath+'/layui/lay/modules/'
    }).extend({
        formSelects: 'formSelects-v4'
    }).use([ 'table','form','laydate'], function(){
        var $ = layui.$
        var form = layui.form

        form.on("submit(*)",function(obj){
            var url = "${request.getContextPath()}/appBordGroup/update";
            $.getJSON(url,obj.field,function(rst){
                if(rst.statusCode == 200){
                    var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
                    parent.layer.close(index); //再执行关闭   ;
                }else{
                    layer.alert(rst.message,{icon:2})
                }
            })
            return false
        })
    })
</script>
